//
//  ZBNavigationControllerStack.h
//  BaseRACDemo
//
//  Created by 庄波 on 2018/3/7.
//  Copyright © 2018年 庄波. All rights reserved.
//
/**
 * view 层维护一个 ‘ZBNavigationController’ 不管是Push/Pop 还是 present/dismiss 都使用栈顶的ZBNavigationController 来执行导航操作 并且保证present 出来的是一个ZBNavigationController
 */

#import <Foundation/Foundation.h>

@protocol ZBViewModelServices;

@interface ZBNavigationControllerStack : NSObject
/**
 * 初始化方法 这是创建新的导航控制器堆栈、
 * services 模型层的服务总线
 */
- (instancetype)initWithServices:(id<ZBViewModelServices>)services;

/// Pushes the navigation controller.
///
/// navigationController - the navigation controller
- (void)pushNavigationController:(UINavigationController *)navigationController;

/// Pops the top navigation controller in the stack.
///
/// Returns the popped navigation controller.
- (UINavigationController *)popNavigationController;

/// Retrieves the top navigation controller in the stack.
///
/// Returns the top navigation controller in the stack.
- (UINavigationController *)topNavigationController;
@end
